@import '@common/styles/index.scss';

@mixin uploadStyles {
  transition: all 0.5s;
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: $mask-bg-color;
  color: $white;
}

.userCenterEditHeader {
  position: relative;
  min-height: 284px;
  border-bottom: 1px solid $spacer-bg-color;
  // background-color: pink;
  .headImgBox {
    position: absolute;
    left: 50%;
    top: 228px;
    transform: translateX(-50%) translateY(-100%);
    :global {
      .dzq-avatar {
        border: 3px solid;
        box-sizing: border-box;
      }
    }
  }
  .userCenterEditDec {
    position: absolute;
    bottom: 16px;
    display: flex;
    padding: 0;
    justify-content: center;
    align-items: center;
    left: 0;
    right: 0;
    height: 20px;
    line-height: 20px;
    .text {
      // text-align: center;
      font-size: rem($font-size-base);
      text-overflow: -o-ellipsis-lastline;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      line-height: 1.2;
      color: $text-color-primary;
    }
    .userCenterEditDecItem {
      display: flex;
      padding: 0 $padding-4n;
      justify-content: center;
      align-items: center;
      :global {
        .dzq-input {
          width: 100%;
        }
      }
    }
    .compileIcon {
      margin-right: rem($margin-2n);
    }
    .userSignatureInput {
      height: 20px;
      line-height: 20px;
      display: flex;
      align-items: center;
      :global {
        .dzq-input__inner {
          width: 100%;
          line-height: 1;
          height: 20px;
          border: none;
          line-height: 20px;
          padding: 0;
        }
      }
    }
    .dzq-icon {
      color: $text-color-regular;
      font-size: rem($font-size-middle);
    }
  }
  .userCenterEditCameraIcon {
    position: absolute;
    width: 34px;
    height: 34px;
    background-color: $primary-color;
    border-radius: 50%;
    right: 0;
    bottom: 0;
    box-sizing: border-box;
    border: 2px solid $white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    :global {
      .dzq-icon {
        color: $white;
      }
    }
  }
}

// 上传样式
.uploadAvatar {
  @include uploadStyles();
  z-index: 0;
  .uploadText {
    margin-left: $margin-2n;
  }
}
.bgContent {
  position: relative;
  // 上传背景图片样式
  .uploadBgUrl {
    @include uploadStyles();
    z-index: 0;
    border-radius: 0;
    .uploadText {
      margin-left: $margin-2n;
    }
  }
}

.hiddenElement {
  position: absolute;
  z-index: -1;
  visibility: hidden;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 顶部title样式 */
.topBar {
  position: absolute;
  top: 14px;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  padding: $padding-4n;
  box-sizing: border-box;
  text-align: center;
  max-width: calc(100% - 100px);
  justify-content: space-between;
  z-index: 1;
  .fullScreenTitle {
    font-size: $font-size-middle;
    color: $white;
    max-width: 200px;
    @include text-ellipsis();
  }
}
